package com.hq.service.impl;

import com.hq.entity.UserInfo;
import com.hq.mapper.UserMapper;
import com.hq.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")
@Slf4j
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    // 登录
    @Override
    public UserInfo login(UserInfo user) {
        log.info("用户登录：{}", user);
        return userMapper.login(user);
    }

    /**
     * 修改密码
     * @param user
     * @return
     */
    @Override
    public int updatePwd(UserInfo user) {
        log.info("修改密码：{}", user);
        return userMapper.changePwd(user);
    }

}
